<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>">
<title>Home</title>
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />

<link href="resources/css/home.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="resources/js/jquery-1.6.2.js"></script>

<script type="text/javascript"
	src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=1166443256"></script>
<script type="text/javascript">
	WB2.anyWhere(function(W) {
		W.widget.hoverCard({
			id : "apps_listing_grid",
			tag : 'img',
		});
	});

	WB2.anyWhere(function(W) {
		W.widget.hoverCard({
			id : "ctl00_CPR_Signup1_PanelOuter",
			tag : 'img',
		});
	});

	function follow(tradeId) {
		$.ajax({
			type : "post",
			dataType : "text",
			url : "sinaaction/followAction.do?tradeId=" + tradeId,
			success : showMessage,
			error : function() {
				alert("连接失败。");
			}
		});
	}

	function showMessage(msg) {
		var regExp = /\d+/;
		if (!regExp.test(msg)) {
			alert(msg);
		} else {
			alert("关注成功，您将获得" + msg + "个seeds。");
		}
	}
</script>

</head>

<body id="ctl00_body">
	<!-- BodyContainer start -->
	<div id="BodyContainer">
		<!-- main start -->
		<div id="Main" class="clearfix">
			<!-- header container start -->
			<div class="header container">
				<h1>
					<a href="/">测试</a>
				</h1>
				<div class="clear">
					<div class="loginBox">
						<a class="" href="/login"> 帮助</a> | <a class="" href="/login">
							注销登录</a>
					</div>
				</div>
			</div>
			<!-- header container end -->

			<!-- menuContent start -->
			<div class="menuContent">
				<div class="container clear">
					<ul class="mainMenu">
						<li><a class='selected' href='/twitter'>首页</a>
						</li>
						<li><a href='/followers'>兴趣爱好</a>
						</li>
						<li><a href='/apps'>赏金任务</a>
						</li>
						<li><a href='/seeds'>其他</a>
						</li>
						<li><a href='/how-to-twitter'>其他</a>
						</li>
						<li><a class='hide' href=''></a>
						</li>
						<li><a class='hide' href='/login'></a>
						</li>
						<li><a class='hide' href=''></a>
						</li>
					</ul>
				</div>
				<div class="menuBar clearfix">
					<div class="container">
						<ul>
							<li><a href='/twitter'>关注</a>
							</li>
							<li><a href='/all'>创建交易</a>
							</li>
							<li><a href='/tools/twust'>交易历史</a>
							</li>
							<li><a href='/history'>效果图</a>
							</li>
							<li><a class='selected hide' href='#'></a>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<!-- menuContent end -->

			<!-- searchBar start -->
			<div class="searchBar">
				<div class="container clearfix" style="height: 15px">
					<h6>滚动显示当前活动的人。</h6>
				</div>
				<div class="bottom">&nbsp;</div>
			</div>
			<!-- searchBar end -->

			<!-- ctl00_UpdatePanel1 start -->
			<div id="ctl00_UpdatePanel1">
				<div class="main container">
					<div class="mainContent">
						<!-- 						<div class="basicSort clearfix"> -->
						<!-- 							<div class="sort"> -->
						<!-- 								<h1></h1> -->
						<!-- 							</div> -->
						<!-- 							<div class="feedback"> -->
						<%-- 								<span id="DoneMessage">&nbsp</span> <span id="DoingMessage">&nbsp</span> --%>
						<!-- 							</div> -->
						<!-- 						</div> -->
						<!-- 						<div id="ShareTarget" -->
						<!-- 							sharetitle="Cool+Twitter+Directory%2c+Twiends+Twitter+Users+%7c+Twiends" -->
						<!-- 							sharepath="%2ftwitter" -->
						<!-- 							sharedesc="This+is+a+really+cool+way+to+find+interesting+tweeps">&nbsp;</div> -->
						<!-- 						<div id="ctl00_CPL_UpdatePanel1"> -->
						<!-- 							<input type="hidden" name="ctl00$CPL$HiddenRowNumber" -->
						<!-- 								id="ctl00_CPL_HiddenRowNumber" value="1" /> -->
						<!-- 						</div> -->


						<div id="sort_bar">
							<div id="platform_cats_box">
								<label for="categories">兴趣：</label> <select name="categories"
									id="categories" style="width: 150px">
									<option value="">音乐</option>
									<option value="/apps/index/all/author">体育</option>
									<option value="/apps/index/all/brand"></option>
									<option value="/apps/index/all/celebrity"></option>
								</select>
							</div>
							<div id="sort_by_box">
								<label for="sort_by">位置：</label> <select name="sort_by"
									id="sort_by" style="width: 150px">
									<option value="/apps/index/all/name">北京</option>
									<option value="/apps/index/all/pro">上海</option>
									<option value="/apps/index/all/plus">天津</option>
								</select>
							</div>
						</div>

						<div class="twiendingHalf">
							<div id="apps_listing_grid">
								<s:iterator id="tradeInfo" value="tradeList" status="tl">
									<s:if test="#tl.index % 6 == 0">
										<div class="appy_row grouping_0">
									</s:if>
									<s:if test="#tl.index % 3 == 0 && #tl.index % 6 != 0">
										<div class="appy_row grouping_3">
									</s:if>
									<div class="app_listing_container">
										<img src="${tradeInfo.tuUserinfo.twSinainfo.profileImageUrl }"
											class="app_listing_thumb"
											alt="${tradeInfo.tuUserinfo.twSinainfo.screenName }"
											wb_user_id="${tradeInfo.tuUserinfo.twSinainfo.sinaId }"
											wb_screen_name="${tradeInfo.tuUserinfo.twSinainfo.screenName }" />
										<div class="app_listing_deets">
											<h3>${tradeInfo.tuUserinfo.twSinainfo.screenName }</h3>
											<small><em>${tradeInfo.tuUserinfo.twSinainfo.sex
													}</em> </small> <a href="javascript:follow('${tradeInfo.tradeId }')"
												class="app_view_details">关注</a>
										</div>
									</div>
									<s:if test="(#tl.index + 1) % 3 == 0 || #tl.last">
							</div>
							</s:if>
							</s:iterator>
						</div>
					</div>
				</div>
			</div>
			<div id="ctl00_Sidebar" class="sidebar">
				<div id="ctl00_CPR_Signup1_UP4">
					<div id="ctl00_CPR_Signup1_PanelOuter" class="registration">
						<div class="userImgBorder"></div>
						<img src="${session.user.imgUrl }" wb_user_id="${session.sinaId }"
							wb_screen_name="${session.user.userSinaName}" class="userImg" />
						<div class="seedsShow">
							<h1>30</h1>
							<h2>粉币</h2>
						</div>
						<div class="userProfile">
							<h4>昵称：${session.user.userName }</h4>
							<h4>昵称</h4>
							<h4>昵称</h4>
							<h4>昵称</h4>
							<br /> <a href="createtrade.jsp">创建交易</a>
						</div>
						<span id="ctl00_CPR_Signup1_LabelStatus"
							class="status ajaxholder1"> <a
							style='font-weight: bold; text-decoration: underline;'
							href='/terms'></a> </span>
					</div>
				</div>
				<div class="features">
					<h4>粉丝动态：</h4>
					<b>+38</b>
				</div>
				<div class="featuresBottom"></div>
			</div>
		</div>
	</div>
	<!-- ctl00_UpdatePanel1 end -->

	</div>
	<!-- main end -->
	</div>
	<!-- BodyContainer start -->

	<!-- footer start -->
	<div class="footer">
		<div class="container">
			<ul>
				<li><a href="/">主页</a>
				</li>
				<li><a href="/rules">规则</a>
				</li>
				<li><a href="/privacy">隐私声明</a>
				</li>
				<li><a href="/faq">常见问题</a>
				</li>
				<li><a href="/help">帮助</a>
				</li>
				<li><a href="" style="margin-right: 100px;">支持</a>
				</li>
			</ul>
		</div>
	</div>
	<!-- footer end -->

</body>
</html>
